package com.company.观察者模式;

public class Productor implements Observer{
    @Override
    public void update(Object arg) {
        int priceVar = (Integer) arg;
        if (priceVar>0){
            System.out.println("行情不错，加大生产力度");
        }else if (priceVar<0){
            System.out.println("行情不行，减少产量");
        }else if (priceVar==0){
            System.out.println("继续观察...");
        }
    }
}
